import Request from '@/libs/request'

/**账号登录 */
export const webLogin = (data: {userName: string; userPass: string}) =>
  Request.get<User.Info>('/user/webLogin', data)

/**Web手机号获取验证码登录 */
export const webLoginGetCode = (data: {userPhone: string}) =>
  Request.get<null>('/webLoginGetCode', data)

/**获取手机号 校验码 */
export const verifyGetCode = (data: {userPhone: string; userId: number}) =>
  Request.get<null>('/user/verifyGetCode', data)

/**WEB注册登录 （手机验证码） */
export const webRegisterAndLogin = (data: {userPhone: string; verfiyCode: string}) =>
  Request.get<User.Info>('/user/webRegisterAndLogin', data)

/**WEB微信扫码登录 */
export const webWxScanLogin = (data: {userName: string; userWeichatId: string}) =>
  Request.get<User.Info>('/user/webWxScanLogin', data)
